package renpyas3.model.structs
{
	/**
	 * data structure to store ifOperators and its jump destinations
	 */
	public class RenpyIfOperator
	{
		private var _ifTrueJumpTo:uint;
		private var _ifFalseJumpTo:uint;
		private var _varibleName:String;
		private var _lineNumberToParseFalse:uint;
		
		public function RenpyIfOperator(varibleName:String, ifTrueJumpTo:uint, lineNumberToParseFalse:uint) 
		{
			_varibleName = varibleName;
			_ifTrueJumpTo = ifTrueJumpTo;
			_lineNumberToParseFalse = lineNumberToParseFalse;
		}

		/**
		 * variable to be evaulated
		 */
		public function get varibleName():String { return _varibleName; }
		
		/**
		 * jump to this line in the block if the variable value is true
		 */
		public function get ifTrueJumpTo():uint { return _ifTrueJumpTo; }
		
		/**
		 * jump to this line in the block if the variable value is false
		 */
		public function get ifFalseJumpTo():uint { return _ifFalseJumpTo; }
		
		/**
		 * jump to this line in the block if the variable value is false
		 */
		public function set ifFalseJumpTo(value:uint):void 
		{
			_ifFalseJumpTo = value;
		}

		/**
		 * when the parser gets to this line it would be able to know
		 * the value of _ifFalseJumpTo
		 */
		public function get lineNumberToParseFalse():uint { return _lineNumberToParseFalse; }
		
		
	}

}